<?php  if ( ! defined('BASEPATH')) exit ('No direct script access allowed');

class myqiqu extends  MY_Controller {

	//default page
	public function index(){
        $this -> load_myqiqu(); //装入我的奇趣页面 
	}
	
	//装入模板中相同的部分内容
	private function LoadCommonContends(){
        $this ->template['loginstatus_content'] = 	$this -> load -> view(VIEW_LOGINBAR, $this ->template, TRUE);   //load login status bar
	    $this ->template['head_content'] = $this -> load -> view(VIEW_HEAD, $this ->template, TRUE);   //load  head
	    $this ->template['tabpage_content'] = $this -> load -> view(VIEW_TABPAGE, $this ->template, TRUE);   //load  tab page
	    $this ->template['sidemenu_content'] = $this -> load -> view(VIEW_MYQIQU_SIDEMENU, $this ->template, TRUE);   //load  side menu
		$this ->template['foot_content'] = $this -> load -> view(VIEW_FOOT, $this ->template, TRUE);   //load foot content
	}
	
	//我的奇趣主页面
	public function load_myqiqu(){
        $this-> LoadCommonContends();
	    $this ->template['annoucement_content'] = 	$this -> load -> view(VIEW_ANNOUCEMENT, $this ->template, TRUE);   //load annoucement content
	    $this ->template['main_content'] = $this -> load -> view('myqiqu/myqiqu_mainpage', $this ->template, TRUE);         //load  main page
		$this ->load->view('myqiquframe_view', $this->template);    //load default my qiqu page
	}
	
    //唯一收货地址页面
	public function uniqueaddress(){
		$this ->template['sidemenu_sel'] = 'uniqueaddress';   //唯一收货地址项被选择
	    $this ->template['annoucement_content'] = 	'';           //No annoucement content in this page
        $this ->LoadCommonContends();
	    $this ->template['main_content'] = $this -> load -> view('myqiqu/myqiqu_uniqueaddress', $this ->template, TRUE);         //load  main page
	    $this ->load->view('myqiquframe_view', $this->template);    
	}
	
	
	public function test(){
		
		$content = '';
		$content .= 'cur method:'.$this->router->fetch_method() . ' curClass:' . $this->router->fetch_class() ;
		$content .= ' url: ' . $this->uri->uri_string();
		$content .= ' querystring: ' . $_SERVER['QUERY_STRING'];
		 
		echo $content;  
	}
	
	
}

